import { validateNumberPhone, validateNumberFixed } from '/@/utils/validators';
import request from '/@/api/project/order/index';
export default function (data: any) {
	const array = [
		{
			type: 'input',
			label: window.$t('vpXFyUsTxImWziby3as'),
			key: 'nickName',
			value: data.nickName || '',
			disabledStyle: true,
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('rLg1gKwLjTArrPpWpNsU'), trigger: ['change', 'blur'] }],
		},

		{
			type: 'date',
			label: window.$t('ccj163prfg8NiRpqxbwz'),
			key: 'birthday',
			value: data.birthday || '',
			dateOption: {
				dataFormat: 'YYYY-MM-DD',
			},
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('5r7o7JuA9KAlJlUlwSr4'), trigger: ['change', 'blur'] }],
		},

		{
			type: 'number',
			label: window.$t('i9nRaJfWz5gMou3AiizPp'),
			key: 'telNum',
			value: data?.sysEmpInfo.telNum ? data?.sysEmpInfo.telNum : '',
			rules: [{ validator: validateNumberPhone, required: true, label: '', trigger: ['change', 'blur'] }],
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},

		{
			type: 'input',
			label: 'E-mail:',
			key: 'email',
			value: data?.sysEmpInfo.email ? data?.sysEmpInfo.email : '',
			rules: [{ type: 'email', required: true, message: window.$t('kFb6TvlIo4edKezdojsxZ'), trigger: 'blur' }],
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},

		{
			type: 'radio',
			label: window.$t('pd3J8i5GpFgI3m7BkIj1P'),
			key: 'sex',
			value: data.sex || '',
			options: [
				{
					label: window.$t('mZw3jjFnDlQ0BZyEp3aO'),
					value: 1,
				},
				{
					label: window.$t('dDm5hcNxsQviONvJk6Ly'),
					value: 2,
				},
			],
			placeHolder: window.$t('tZdjK23IfmQZocPheXiM'),
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('q8pulcWKlWpKhkmrL9_0'), trigger: ['change', 'blur'] }],
		},
	];
	return array;
}
